
var delivery_success_vm = avalon.define({
    $id: 'delivery-success',
    is_display_detail: false,
    lines: [],

    display_detail: function(picking_id) {
        if (delivery_success_vm.lines.length == 0) {
            $.ajax({
                url: '/weixin/delivery/get_lines',
                data: {picking_id: picking_id},
                success: function(e) {
                    delivery_success_vm.lines = JSON.parse(e);
                },
                type: 'get',
                async: true,
            });
        };
        delivery_success_vm.is_display_detail = !delivery_success_vm.is_display_detail;
    }
});